Function Set-ISEOptionsAsDefault
{
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory = $False)]
        [String]
        $private:ISEOptionsText = $Null
    )
    
    Process
    {
        $private:ConfigXml = Get-ISEOptionsConfigXml
        
        If ([String]::IsNullOrEmpty($ISEOptionsText))
        {
            $private:ISEOptionsText = Get-VariableText "`$psISE.Options"
        }

        #$private:XmlTextNode = $ConfigXml.CreateTextNode()
        
        $ConfigXml.ConfigManager.Settings = $ISEOptionsText
        #$ConfigXml.ConfigManager.Settings.AppendChild($XmlElement) | Out-Null
        
        $private:ConfigPath = Get-ProfilePath | Join-Path -ChildPath "ISEOptionsConfigurator.xml"
        $ConfigXml.Save($ConfigPath)
    }
}

Export-ModuleMember Set-ISEOptionsAsDefault
